addpath ../../../../Generator
addpath ../../../../PDCO
addpath ../../../../CRNTSolvers
addpath ../../../../Generator/GrTheory
%Create the figures of Infeasiblility vs Iteration
%load the results from the experiment.
addpath ../../../../TestsSingleLinkage/

FixedPointIterationTest
% plot the convergence of mu to [R F]*v
h=semilogy(1:iter, mass_infeas(1:iter),'b.-');
title('Mass balance infeasibility vs iteration count for single linkage network')
xlabel('Iteration')
ylabel('log ||Y(A^T-D)v||_\infty')
saveas(h,'InfeasibilityVsIteration.png','png');



addpath ../../../../TestsMultipleLinkage
FixedPointIterationTestMultiple

% plot the convergence of |YA_keta|_infty
h = semilogy(1:iter, mass_infeas(1:iter),'b.-');
title('Mass balance infeasibility vs iteration count for two linkage class network')
xlabel('Iteration')
ylabel('log ||YA_kv||_\infty')
saveas(h,'InfeasibilityVsIterationMultiple.png','png');

%Create the iteration count vs network size graph
load ../../../../../Results/NetworkSizeVsItCountSingleLink.mat
Nsizes = [100:200:5000];
h = plot(Nsizes,mean(Results));
xlabel('Number of complexes');
ylabel('Average iteration count');
saveas(h,'SingleNetAvgIterationsVsNetSize.png','png');

load ../../../../Results/NetworkSizeVsItCountMultipleLink.mat
%Create the iteration count vs network size graph
load ../../../../../Results/NetworkSizeVsItCountMultipleLink.mat
Nsizes = [100:200:5000];
h = plot(Nsizes,mean(Results));
xlabel('Number of complexes');
ylabel('Average iteration count');
saveas(h,'MultipleNetAvgIterationsVsNetSize.png','png');

